<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Tetris Game: /home/hokan/NetBeansProjects/TetrisGame/headers/CGameManager.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Tetris Game
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Test game project created via Irrlicht and Qt</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_c_game_manager_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">/home/hokan/NetBeansProjects/TetrisGame/headers/CGameManager.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* </span>
<a name="l00002"></a>00002 <span class="comment"> * File:   CGameManager.h</span>
<a name="l00003"></a>00003 <span class="comment"> * Author: hokan</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Created on 1 Июль 2014 г., 13:28</span>
<a name="l00006"></a>00006 <span class="comment"> */</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef CGAMEMANAGER_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define CGAMEMANAGER_H</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#pragma GCC diagnostic ignored &quot;-Wunused-parameter&quot;</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC diagnostic ignored &quot;-Wunused-variable&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#include &lt;IGUIStaticText.h&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#pragma GCC diagnostic warning &quot;-Wunused-parameter&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC diagnostic warning &quot;-Wunused-variable&quot;</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;headers/CGameFieldManager.h&quot;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;headers/CGameFiguresFactory.h&quot;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;headers/CFigure.h&quot;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;CUserInputEventReceiver.h&quot;</span>
<a name="l00021"></a>00021 
<a name="l00025"></a><a class="code" href="class_c_game_manager.html">00025</a> <span class="keyword">class </span><a class="code" href="class_c_game_manager.html">CGameManager</a> {
<a name="l00026"></a>00026 <span class="keyword">public</span>:
<a name="l00038"></a>00038     <a class="code" href="class_c_game_manager.html#a3ff6976be909ffca4924ca0c19b69f23">CGameManager</a>(irr::gui::IGUIEnvironment* guiEnvironment, <a class="code" href="class_c_game_field_manager.html">CGameFieldManager</a>* gameFieldManager, <a class="code" href="class_c_game_figures_factory.html">CGameFiguresFactory</a>* gameFiruresFactory, <a class="code" href="class_c_user_input_event_receiver.html">CUserInputEventReceiver</a>* userInputReceiver, <span class="keywordtype">bool</span> twoDimensionalMode, irr::core::vector3df fieldOrigin, irr::core::aabbox3df fieldAABB);
<a name="l00039"></a>00039     
<a name="l00043"></a>00043     <span class="keyword">virtual</span> <a class="code" href="class_c_game_manager.html#aac6f02494dc7ea4ed27e762626f560cc">~CGameManager</a>();
<a name="l00044"></a>00044 
<a name="l00051"></a>00051     irr::u32 <a class="code" href="class_c_game_manager.html#ac240beebb99ce50981ee7d4db4c74dc9">deleteConstuctedLines</a>();
<a name="l00052"></a>00052 
<a name="l00060"></a>00060     <span class="keywordtype">bool</span> <a class="code" href="class_c_game_manager.html#a2c889936fbafdfa47e203d4651483b99">spawnNewFigure</a>(EGF_FIGURE_TYPE figureType, irr::f32 figureSize);
<a name="l00061"></a>00061     
<a name="l00068"></a>00068     <span class="keywordtype">bool</span> <a class="code" href="class_c_game_manager.html#a2c889936fbafdfa47e203d4651483b99">spawnNewFigure</a>(EGF_FIGURE_TYPE figureType);
<a name="l00069"></a>00069     
<a name="l00075"></a>00075     irr::f32 <a class="code" href="class_c_game_manager.html#af7105f76d800234cbdb9ba7279b9bb86">getGameSpeed</a>() <span class="keyword">const</span>;
<a name="l00076"></a>00076     
<a name="l00082"></a>00082     <span class="keywordtype">void</span> <a class="code" href="class_c_game_manager.html#a6e78f4d645a7a76ce0f32b2afea28d92">setGameSpeed</a>(irr::f32 newSpeed);
<a name="l00083"></a>00083     
<a name="l00089"></a>00089     irr::f32 <a class="code" href="class_c_game_manager.html#a3ae546def5b05659b9604d27f33f65c6">getFigureSize</a>() <span class="keyword">const</span>;
<a name="l00090"></a>00090     
<a name="l00096"></a>00096     <span class="keywordtype">void</span> <a class="code" href="class_c_game_manager.html#a2c213d9a9c4a17ea18cf0af3ec9f192c">setFigureSize</a>(irr::f32 newFigureSize);
<a name="l00097"></a>00097     
<a name="l00103"></a>00103     irr::core::vector3di <a class="code" href="class_c_game_manager.html#af295a64173f78d4167900eacbe88ac76">getSpawnPoint</a>() <span class="keyword">const</span>;
<a name="l00104"></a>00104     
<a name="l00110"></a>00110     <span class="keywordtype">void</span> <a class="code" href="class_c_game_manager.html#a3b1da103719b584e113234eac00befd3">setSpawnPoint</a>(irr::core::vector3di newSpawnPoint);
<a name="l00111"></a>00111     
<a name="l00117"></a>00117     irr::u32 <a class="code" href="class_c_game_manager.html#acb57c88fcabe50fe40fee6b324815d69">getGameScore</a>() <span class="keyword">const</span>;
<a name="l00118"></a>00118     
<a name="l00124"></a>00124     <span class="keywordtype">void</span> <a class="code" href="class_c_game_manager.html#a67a919ef5d542a65aae84699971b076e">setGameScore</a>(irr::u32 newGameScore);
<a name="l00125"></a>00125     
<a name="l00131"></a>00131     <span class="keywordtype">bool</span> <a class="code" href="class_c_game_manager.html#a8ce88a2bcd81b5ca63a056bf115f49af">getTwoDimensionalMode</a>() <span class="keyword">const</span>;
<a name="l00132"></a>00132     
<a name="l00138"></a>00138     <span class="keywordtype">void</span> <a class="code" href="class_c_game_manager.html#a79866b4f212814c62e467e0d28e1fc43">setTwoDimensionalMode</a>(<span class="keywordtype">bool</span> twoDimensionalMode);
<a name="l00139"></a>00139     
<a name="l00145"></a>00145     <span class="keywordtype">bool</span> <a class="code" href="class_c_game_manager.html#a39603a5edda67beabefd5e5893f13e5b">isPause</a>() <span class="keyword">const</span>;
<a name="l00146"></a>00146     
<a name="l00152"></a>00152     <span class="keywordtype">void</span> <a class="code" href="class_c_game_manager.html#a0141a4bb9d60127ff8184d0ae9e3f20d">setPauseValue</a>(<span class="keywordtype">bool</span> newPauseValue);
<a name="l00153"></a>00153     
<a name="l00159"></a>00159     <span class="keywordtype">bool</span> <a class="code" href="class_c_game_manager.html#a0487289fbc33159135772653afe7adf9">isGameOver</a>() <span class="keyword">const</span>;
<a name="l00160"></a>00160     
<a name="l00166"></a>00166     <span class="keywordtype">void</span> <a class="code" href="class_c_game_manager.html#a69696ba28f6f91a0c2cec58a55292f0e">setGameOverValue</a>(<span class="keywordtype">bool</span> newGameOverValue);
<a name="l00167"></a>00167     
<a name="l00174"></a>00174     irr::u32 <a class="code" href="class_c_game_manager.html#adb4a34810119ee4fdf5ff14859b52ba5">calculateGameScore</a>(irr::u32 numberOfDeletedLines);
<a name="l00175"></a>00175     
<a name="l00176"></a>00176     <span class="comment">// TODO softly remove</span>
<a name="l00182"></a><a class="code" href="class_c_game_manager.html#ace46a08b24c2347ff5b6aaf069645329">00182</a> <span class="comment"></span>    irr::core::vector3df <a class="code" href="class_c_game_manager.html#ace46a08b24c2347ff5b6aaf069645329">getGridBoxPosition</a>()<span class="keyword"> const </span>{
<a name="l00183"></a>00183         <span class="keywordflow">return</span> gridBoxPosition;
<a name="l00184"></a>00184     }
<a name="l00185"></a>00185 
<a name="l00191"></a>00191     <span class="keywordtype">bool</span> <a class="code" href="class_c_game_manager.html#a98bcc066b78437029878792304e2427f">runOneLoop</a>();
<a name="l00192"></a>00192         
<a name="l00193"></a>00193 <span class="keyword">private</span>:
<a name="l00197"></a>00197     <a class="code" href="class_c_game_field_manager.html">CGameFieldManager</a>* gameFieldManager;
<a name="l00198"></a>00198     
<a name="l00202"></a>00202     <a class="code" href="class_c_game_figures_factory.html">CGameFiguresFactory</a>* gameFiruresFactory;
<a name="l00203"></a>00203     
<a name="l00207"></a>00207     <a class="code" href="class_c_user_input_event_receiver.html">CUserInputEventReceiver</a>* userInputReceiver;
<a name="l00208"></a>00208     
<a name="l00212"></a>00212     irr::core::array&lt;CFigure*&gt; figures;
<a name="l00213"></a>00213     
<a name="l00217"></a>00217     <span class="keywordtype">bool</span> twoDimensionalMode;   
<a name="l00218"></a>00218     
<a name="l00222"></a>00222     irr::f32 speed;
<a name="l00223"></a>00223     
<a name="l00227"></a>00227     irr::f32 figureSize;
<a name="l00228"></a>00228     
<a name="l00232"></a>00232     irr::core::vector3di spawnPoint;
<a name="l00233"></a>00233     
<a name="l00237"></a>00237     irr::u32 gameScore;
<a name="l00238"></a>00238             
<a name="l00242"></a>00242     irr::core::vector3df fieldOrigin;  
<a name="l00243"></a>00243     
<a name="l00247"></a>00247     irr::core::aabbox3df aabb;
<a name="l00248"></a>00248     
<a name="l00252"></a>00252     irr::core::vector3df gridBoxPosition;
<a name="l00253"></a>00253     
<a name="l00257"></a>00257     irr::gui::IGUIEnvironment* guiEnvironment;
<a name="l00258"></a>00258     
<a name="l00262"></a>00262     irr::gui::IGUIStaticText* text;
<a name="l00263"></a>00263     
<a name="l00267"></a>00267     <span class="keywordtype">bool</span> gameOver;
<a name="l00268"></a>00268     
<a name="l00272"></a>00272     <span class="keywordtype">bool</span> animatorsStopped;
<a name="l00273"></a>00273 };
<a name="l00274"></a>00274 
<a name="l00275"></a>00275 <span class="preprocessor">#endif  </span><span class="comment">/* CGAMEMANAGER_H */</span>
<a name="l00276"></a>00276 
</pre></div></div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>CGameManager.h</b>      </li>

    <li class="footer">Generated on Sun Jul 6 2014 19:35:11 for Tetris Game by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
